Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply generic definitions wherever applicable #577

Merged
merged 1 commit into from
Jan 15, 2016

Conversation

lgoldstein
Copy link
Contributor

Make the code at least 1.5 compatible so as to detect trivial errors during compile phas

@lgoldstein lgoldstein force-pushed the apply-generics branch 2 times, most recently from 8e87337 to 8cc0a87 Compare January 11, 2016 07:39
@@ -6,18 +6,24 @@

public interface W32APIOptions extends StdCallLibrary {
/** Standard options to use the unicode version of a w32 API. */
Map UNICODE_OPTIONS = Collections.unmodifiableMap(new HashMap() {
Map<Object, Object> UNICODE_OPTIONS = Collections.unmodifiableMap(new HashMap<Object, Object>() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Options maps are always Map<String,Object>.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right - don't know why I thought otherwise. Fixed and pushed updated files.

@lgoldstein
Copy link
Contributor Author

Strange failure since the core classes project (jna) succeeds, and it does reference Memory and Pointer, etc...

@lgoldstein
Copy link
Contributor Author

I don't understand why it fails - I added (locally on my computer) an echo control message and the classpath seems in order:

-do-compile:
[echo] JAVAC: source=1.6 target=1.6 classpath=C:\Projects\jvmsquare\jna-contrib\jna\build\jna.jar;C:\Projects\jvmsquare\jna-contrib\jna\build\test-classes

The reference jna.jar exists and contains the Memory.class compiled code in it, so I don't understand why the compiler complains that it cannot find the symbol. I am at a loss as to why it fails to locate these symbols (and I have tried a lot of different things I know about ANT and JAVAC to no avail) - any help will be greatly appreciated...

@lgoldstein lgoldstein force-pushed the apply-generics branch 2 times, most recently from 0b9c7a3 to 1ca2d4c Compare January 14, 2016 05:39
@lgoldstein
Copy link
Contributor Author

Figured it out - trivial mistake - did not notice that I inadvertently removed some import(s) in the failing classes. Fixed and re-pushed - hopefully now everything will be OK...

@lgoldstein
Copy link
Contributor Author

Seems that now everything is quiet - please review and see if OK to merge

twall added a commit that referenced this pull request Jan 15, 2016
Apply generic definitions wherever applicable
@twall twall merged commit 2ba0d30 into java-native-access:master Jan 15, 2016
@lgoldstein lgoldstein deleted the apply-generics branch January 17, 2016 09:41
mstyura pushed a commit to mstyura/jna that referenced this pull request Sep 9, 2024
Motivation:

Since version 0.0.42.Final the connection from an android client was not
working anymore, caused by a QuicClosedChannelException. After
inspecting the changes I found that
885a18a introduced the bug.

Modifications:

The call to Quiche.memoryAddress used the capacity of the wrong buffer.
The bug only appeared on Android because on most other platforms the
buf.hasMemoryAddress() is true, and the len parameter is not used
therefore.

Result:

Make netty-incubator-codec-quic work on Android again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants